#ifndef __TS_06_H__
#define __TS_06_H__
#include "GPIO.h"
#include "Exti.h"

#define I2C2_SDA_GPIO_PORT           GPIO_P2
#define I2C2_SDA_GPIO_PIN            GPIO_Pin_1
#define TS06_INT_GPIO_PORT           GPIO_P3
#define TS06_INT_GPIO_PIN            GPIO_Pin_3
#define I2C2_SCK_GPIO_PORT           GPIO_P2
#define I2C2_SCK_GPIO_PIN            GPIO_Pin_0

#define I2C2_SDA_HIGH()              (P21 = 1)
#define I2C2_SDA_LOW()               (P21 = 0)
#define I2C2_SCK_HIGH()              (P20 = 1)
#define I2C2_SCK_LOW()               (P20 = 0)

#define I2C2_SDA_READ()              (P21)

#define TS06_WRITE_OPS               (0x48)
#define TS06_READ_OPS                (0x49)     

void ts06_init(void);
void ts06_read_status(u8 *state);

#endif /* __TS_06_H__ */
